package com.yuyu.shop.infrastructure.persistence.convert;

import cn.hutool.core.bean.BeanUtil;
import com.yuyu.shop.domain.user.DO.ReceiveInfoDO;
import com.yuyu.shop.infrastructure.persistence.po.ReceiveInfoPO;

import java.util.Objects;

/**
 * @author
 * @version 1.0
 * @description: 收货信息转换类
 * @date 2022/8/31 10:00
 */
public class ReceiveInfoPoConvert {

    public static ReceiveInfoDO PO2DO (ReceiveInfoPO receiveInfoPO){
        if (Objects.isNull(receiveInfoPO)){
            return null;
        }
        ReceiveInfoDO receiveInfoDO = new ReceiveInfoDO();
        BeanUtil.copyProperties(receiveInfoPO,receiveInfoDO);
        return receiveInfoDO;
    }
}
